CB608

Technical details

Show code
library(GeoPressureR)
library(leaflet)
library(leaflet.extras)
library(raster)
library(dplyr)
library(ggplot2)
library(kableExtra)
library(plotly)
library(GeoLocTools)
setupGeolocation()
knitr::opts_chunk$set(echo = FALSE)
load(paste0("../data/1_pressure/", params$gdl_id, "_pressure_prob.Rdata"))
# load(paste0("../data/2_light/", params$gdl_id, "_light_prob.Rdata"))
load(paste0("../data/3_static/", params$gdl_id, "_static_prob.Rdata"))
load(paste0("../data/4_basic_graph/", params$gdl_id, "_basic_graph.Rdata"))
col <- rep(RColorBrewer::brewer.pal(8, "Dark2"), times = ceiling(max(pam$sta$sta_id) / 8))

Settings used

All the results produced here are generated with (1) the raw geolocator data, (2) the labeled files of pressure and light and (3) the parameters listed below.

Show code
kable(gpr) %>% scroll_box(width = "100%")
gdl_id crop_start crop_end thr_dur extent_N extent_W extent_S extent_E map_scale map_max_sample map_margin prob_map_s prob_map_s_calib prob_map_thr shift_k kernel_adjust calib_lon calib_lat calib_1_start calib_1_end calib_2_start calib_2_end calib_2_lon calib_2_lat prob_light_w thr_prob_percentile thr_gs thr_as low_speed_fix ringNo scientific_name common_name mass wing_span color
CB608 2021-06-15 2022-05-03 12 45 -97 0 -71 5 300 30 1 NA 0.9 0 1.4 -91.19612 36.66378 2021-06-16 2021-09-15 2022-04-10 2022-05-03 -91.19612 36.66378 0.1 0.9 120 100 15 NA Limnothlypis swainsonii Swainson’s Warbler NA NA NA

Pressure timeserie

The labeling of pressure data is illustrated with this figure. The black dots indicates the pressure datapoint not considered in the matching. Each stationary period is illustrated by a different colored line.

Show code
pressure_na <- pam$pressure %>%
  mutate(obs = ifelse(isoutliar | sta_id == 0, NA, obs))
p <- ggplot() +
  geom_line(data = pam$pressure, aes(x = date, y = obs), colour = "grey") +
  geom_point(data = subset(pam$pressure, isoutliar), aes(x = date, y = obs), colour = "black") +
  # geom_line(data = pressure_na, aes(x = date, y = obs, color = factor(sta_id)), size = 0.5) +
  geom_line(data = do.call("rbind", shortest_path_timeserie) %>% filter(sta_id > 0), aes(x = date, y = pressure0, col = factor(sta_id))) +
  theme_bw() +
  scale_colour_manual(values = col) +
  scale_y_continuous(name = "Pressure(hPa)")

ggplotly(p, dynamicTicks = T) %>% layout(showlegend = F)

Pressure calibration

Show code
sp_pressure <- do.call("rbind", shortest_path_timeserie) %>% filter(sta_id > 0)

sta_plot <- which(difftime(pam$sta$end, pam$sta$start, unit = "days") > 3)

par(mfrow = c(2, 3))
for (i in seq_len(length(sta_plot))) {
  i_s <- sta_plot[i]
  pressure_s <- pam$pressure %>%
    filter(sta_id == i_s & !isoutliar)

  err <- pressure_s %>%
    left_join(sp_pressure, by = c("date","obs")) %>%
    mutate(
      err = obs - pressure - mean(obs - pressure, na.rm=T)
    ) %>%
    .$err

  hist(err, freq = F, main = paste0("sta_id=", i_s, " | ", nrow(pressure_s), " dtpts | std=", round(sd(err, na.rm=T), 2)))
  xfit <- seq(min(err, na.rm=T), max(err, na.rm=T), length = 40)
  yfit <- dnorm(xfit, mean = mean(err, na.rm=T), sd = sd(err, na.rm=T))
  lines(xfit, yfit, col = "red")
}

Stationay period information

Show code
pam$sta %>% kable()
sta_id start end
1 2021-06-16 19:25:00 2021-10-04 00:25:00
2 2021-10-04 11:25:00 2021-10-05 00:25:00
3 2021-10-05 16:25:00 2021-10-05 18:25:00
4 2021-10-06 02:25:00 2021-10-10 01:25:00
5 2021-10-10 05:55:00 2021-10-11 03:25:00
6 2021-10-11 06:55:00 2022-03-11 07:25:00
7 2022-03-11 08:25:00 2022-03-12 04:55:00
8 2022-03-12 06:55:00 2022-04-05 01:25:00
9 2022-04-05 14:55:00 2022-04-06 01:25:00
10 2022-04-06 10:25:00 2022-04-07 04:25:00
11 2022-04-07 07:25:00 2022-04-08 03:55:00
12 2022-04-08 05:25:00 2022-05-02 23:55:00